package com.zyinhao.common;

import com.baomidou.mybatisplus.extension.service.IService;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * Created by 27529 on 2018/12/8.
 */
public interface BaseService<T extends BaseEntity> extends IService<T> {
    /*================  其他相关操作  ================*/

    /*================  保存操作  ================*/
    public void saveObject(T t);
    public void saveOrUpdateObject(T t);
    public void saveBatchObjects(Collection<T> entities);

    /*================  删除操作  ================*/
    public int deleteObject(String id);
    public int deleteObjectByIds(String ids);
    public int deleteObjectByIds(Collection<String> idList);
    public int deleteObjectsByProperty(Map<String, Object> maps);

    /*================  修改操作  ================*/
    public void updateObject(T t);
    public void updateBatchObjects(Collection<T> entities);
    public void updateObjectsByProperty(Map<String, Object> maps);

    /*================  查询操作  ================*/
    public T findObject(String id);
//    public T findObjectByProperty(Map<String, Object> maps);
    public List<T> findObjectsByIds(String ids);
    public List<T> findObjectsByIds(Collection<String> idList);
//    public int findObjectsCountByProperty(Map<String, Object> maps);
}
